﻿<UserControl x:Class="TMSPS.TRC.Controls.ManageServerControl"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:Converters="clr-namespace:TMSPS.TRC.BL.Wpf.Converters"
    xmlns:Helpers="clr-namespace:TMSPS.TRC.BL.Wpf.Helpers">
    <UserControl.Resources>
        <Converters:RpcPortConverter x:Key="portConverter"/>
    </UserControl.Resources>
    <StackPanel>
        <Label Margin="10,0,10,0">Server name</Label>
        <TextBox Name="ServernameTextBox" Margin="10,0,10,0">
            <Binding Path="Name" UpdateSourceTrigger="PropertyChanged" ValidatesOnDataErrors="True" NotifyOnValidationError="true"  />
        </TextBox>

        <Label Margin="10,0,10,0">Address</Label>
        <TextBox Name="ServerAddressTextBox" Margin="10,0,10,0">
            <Binding Path="Address" UpdateSourceTrigger="PropertyChanged" ValidatesOnDataErrors="True" />
        </TextBox>

        <Label Margin="10,0,10,0">XML RPC Port</Label>
        <TextBox Name="PortTextBox" Margin="10,0,10,0">
            <Binding Path="XmlRpcPort" UpdateSourceTrigger="PropertyChanged" ValidatesOnDataErrors="True" Converter="{StaticResource portConverter}" />
        </TextBox>

        <Label Margin="10,0,10,0">Super Admin Password</Label>
        <PasswordBox Height="23"  Margin="10,0,10,0" Name="PasswordTextBox" HorizontalAlignment="Stretch" Helpers:PasswordHelper.Attach="true" Helpers:PasswordHelper.Password="{Binding SuperAdminPassword, Mode=TwoWay, ValidatesOnDataErrors=True}" />

        <Label Margin="10,0,10,0">Description</Label>
        <TextBox Name="DescriptionTextBox" Margin="10,0,10,0" TextWrapping="WrapWithOverflow" Height="75" AcceptsReturn="True" VerticalScrollBarVisibility="Auto" >
            <Binding Path="Description" UpdateSourceTrigger="PropertyChanged" ValidatesOnDataErrors="True" />
        </TextBox>
    </StackPanel>
</UserControl>
